var e = require;
var t = module;
var n = exports;
var o,
    i =
    (this && this.__extends) ||
    ((o = function(e, t) {
            return (o =
                Object.setPrototypeOf ||
                ({ __proto__: [] }
                    instanceof Array &&
                    function(e, t) {
                        e.__proto__ = t;
                    }) ||
                function(e, t) {
                    for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
                })(e, t);
        }),
        function(e, t) {
            function n() {
                this.constructor = e;
            }
            o(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n()));
        }),
    r =
    (this && this.__decorate) ||
    function(e, t, n, o) {
        var i,
            r = arguments.length,
            a = r < 3 ? t : null === o ? (o = Object.getOwnPropertyDescriptor(t, n)) : o;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, n, o);
        else
            for (var s = e.length - 1; 0 <= s; s--)
                (i = e[s]) && (a = (r < 3 ? i(a) : 3 < r ? i(t, n, a) : i(t, n)) || a);
        return 3 < r && a && Object.defineProperty(t, n, a), a;
    };
Object.defineProperty(n, "__esModule", { value: !0 });
var a = e("index"),
    e = cc._decorator,
    s = e.ccclass,
    c = e.property,
    e = (function(t) {
        function e() {
            var e = (null !== t && t.apply(this, arguments)) || this;
            return (
                (e.bg = null),
                (e.offSign = null),
                (e.onSign = null),
                (e.offBg = null),
                (e.onBg = null),
                (e.m_bOpen = !0),
                e
            );
        }
        return (
            i(e, t),
            (e.prototype.start = function() {
                this.updateState();
            }),
            (e.prototype.getState = function() {
                return this.m_bOpen;
            }),
            (e.prototype.setState = function(e) {
                (this.m_bOpen = e), this.updateState();
            }),
            (e.prototype.updateState = function() {
                null != this.bg && (this.bg.spriteFrame = this.m_bOpen ? this.onBg : this.offBg),
                    a.showNode(this.onSign, this.m_bOpen),
                    a.showNode(this.offSign, !this.m_bOpen);
            }),
            r([c(cc.Sprite)], e.prototype, "bg", void 0),
            r([c(cc.Node)], e.prototype, "offSign", void 0),
            r([c(cc.Node)], e.prototype, "onSign", void 0),
            r([c(cc.SpriteFrame)], e.prototype, "offBg", void 0),
            r([c(cc.SpriteFrame)], e.prototype, "onBg", void 0),
            r([s], e)
        );
    })(cc.Component);
n.default = e;